package com.smart.campus.interfaces;

import com.smart.campus.dto.ShDepartment;
import com.smart.campus.pojo.PagedResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @BelongsProject: smart-campus
 * @BelongsPackage: com.smart.campus.interfaces
 * @Author: JinBao shan
 * @date 2024/9/19 16:51
 * @Description: TODO
 * @Version: 1.0
 */

public interface ShDepartmentServiceApi {
    /**
     * @description: 部门列表分页查询
     * @author: JinBao shan
     * @date: 2024/9/23 9:33
     * @param: [department, pageNum, pageSize] 条件查询参数 页码 条数
     * @return: 返回分页查询后的内容
     **/
    @RequestMapping(value = "findShDepartmentsPagination")
    public PagedResponse<ShDepartment> findShDepartmentsPagination(@RequestBody ShDepartment department, @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum, @RequestParam(value = "pageSize",defaultValue = "5") Integer pageSize);

    /**
     * @description: 获取 sh_department 表中所有信息
     * @author: JinBao shan
     * @date: 2024/9/19 17:05
     * @param: []
     * @return: 获取 sh_department 表中所有信息，并且返回一个list集合
     **/
    @RequestMapping(value = "dept/getShDepartmentList")
    public List<ShDepartment> getShDepartmentList();

    /**
     * @description: 新增部门信息
     * @author: JinBao shan
     * @date: 2024/9/20 8:03
     * @param: [department] 部门信息
     * @return: void
     **/
    @RequestMapping(value = "dept/addShDepartment")
    public void addShDepartment(@RequestBody ShDepartment department);

    /**
     * @description: 根据部门id返回对应部门信息
     * @author: JinBao shan
     * @date: 2024/9/20 8:04
     * @param: [id] 部门id
     * @return: 根据部门id返回对应部门信息
     **/
    @RequestMapping(value = "dept/getShDepartmentById")
    public ShDepartment getShDepartmentById(@RequestParam(value = "id") Integer id);

    /**
     * @description: 根据部门信息中的id修改对应的部门信息
     * @author: JinBao shan
     * @date: 2024/9/20 8:06
     * @param: [department] 部门信息
     * @return: void
     **/
    @RequestMapping(value = "dept/updateShDepartmentById")
    public void updateShDepartmentById(@RequestBody ShDepartment department);

    /**
     * @description: 根据部门id修改部门状态
     * @author: JinBao shan
     * @date: 2024/9/23 11:44
     * @param: [department] 部门信息
     * @return: void
     **/
    @RequestMapping(value = "dept/updateShDepartmentStatusById")
    public void updateShDepartmentStatusById(@RequestBody ShDepartment department);

    /**
     * @description: 根据部门id删除对应的部门信息
     * @author: JinBao shan
     * @date: 2024/9/20 8:07
     * @param: [id] 部门id
     * @return: void
     **/
    @RequestMapping(value = "dept/deleteShDepartmentById")
    public void deleteShDepartmentById(@RequestParam(value = "id") Integer id);
}
